Skip to content

fix(runtime): reclaim anonymous Docker sandbox volumes - #1273

Open
DivyamTalwar wants to merge 1 commit into
Tencent:mainfrom
DivyamTalwar:fix/docker-reclaim-anonymous-sandbox-volumes
Open

DivyamTalwar wants to merge 1 commit into
Tencent:mainfrom
DivyamTalwar:fix/docker-reclaim-anonymous-sandbox-volumes

Conversation

@DivyamTalwar

Copy link
Copy Markdown

What changed

Refs #949.

Docker allocates anonymous volumes when a sandbox image declares VOLUME. The managed platform teardown and Runner cleanup paths used docker rm -f, so those volumes could survive a completed run, a sandbox replacement, or a failed start and accumulate on the host.

Sandbox teardown, Runner orphan cleanup, and Runner uninstall now pass -v when removing LoopForge-owned containers. Docker applies that option to anonymous volumes associated with the removed container and preserves named volumes and bind-mounted workspaces. Docker command reference

Scope

  • Platform core / API / runner
  • Public adapter / deployment

Compatibility

Cleanup remains scoped to the existing LoopForge-managed container selection. Volume reclamation occurs when the owning container is removed.

Validation

  • Reproduced the missing volume cleanup flag against the upstream teardown function. The regression now passes and the Runner cleanup test verifies the expected arguments for an in-run container.
  • Targeted Docker and Runner cleanup tests, go vet -p=2 ./internal/runtime ./internal/runner, and bash -n deploy/bind-cli.sh passed.
  • git diff --check, python3 scripts/check-public.py, and Gitleaks 8.30.1 passed.
  • Docker Desktop was stopped on the test machine. The command tests used the project's Docker fixtures. Live daemon and full platform acceptance checks were not run.

Safety

  • No credentials, internal endpoints, production data, or organization-specific infrastructure.
  • Existing files and unrelated changes preserved.

Codex assisted with the patch and regression tests. I verified the emitted command arguments and checked anonymous volume semantics against the Docker documentation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant